//
//  ViewController.swift
//  BuilderPattern
//
//  Created by 好米有易 on 2017/12/12.
//  Copyright © 2017年 好米有易. All rights reserved.
//

import UIKit

class ViewController: UIViewController {



    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        
        let mealBuilder = MealBuilder()
        
        let vegMeal = mealBuilder.prepareVegMeal()
        
        print("套餐名称：vegMeal" + "套餐内容：")
        vegMeal.showItems()
        print("套餐总价：" + "\(vegMeal.totalCost())")
        
        
        let nonVegMeal = mealBuilder.prepareNonVegMeal()
        
         print("套餐名称：vegMeal" + "套餐内容：")
         nonVegMeal.showItems()
         print("套餐总价：" + "\(nonVegMeal.totalCost())")
        
    }
    
}

